/* **********************************************************
 * Copyright 2010 Dimitar Vangelovski
 *
 * This file is part of the Gens3 3D Engine.
 * 
 * The Gens3 3D Engine is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 * 
 * The Gens3 3D Engine is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with the Gens3 3D Engine; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301, USA
 * **********************************************************/


#pragma once

#include "MeshTface.h"
#include <vector>

class CMeshTFaceList
{
public:

	CMeshTFaceList();
	CMeshTFaceList(const CMeshTFaceList &other);
	CMeshTFaceList(int nMeshNumTVFaces);
	~CMeshTFaceList();

	void			SetMeshTFace(int nPos, const CMeshTface &other) { m_MeshTFaceList[nPos] = other; }
	void			SetMeshTFaceList(const std::vector<CMeshTface> &other) { m_MeshTFaceList = other; }
	void			SetMeshNumTVFaces(int nNum) { m_nMeshNumTVFaces = nNum; }

	void			InsertMeshTFace(const CMeshTface &other) { m_MeshTFaceList.push_back(other); }

	CMeshTface		GetMeshTFace(int nPos) const { return m_MeshTFaceList.size() == 0 ? m_NullMeshTface : m_MeshTFaceList[nPos]; }
	std::vector<CMeshTface>	GetMeshTFaceList() const { return m_MeshTFaceList; }
	int			GetMeshNumTVFaces() const { return m_nMeshNumTVFaces; }

private:
	std::vector<CMeshTface>	m_MeshTFaceList;
	int			m_nMeshNumTVFaces;
	CMeshTface		m_NullMeshTface;
};
